class Student(object):   #创建学生类
    count = 0
    def __init__(self,name):    #初始化
        self.name = name
        Student.count += 1     #创建一个实例数量加一
print(Student.count)
xiaohan = Student('xiaohan')   #创建实例
print(Student.count)